# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=php7-pecl-vips
_pkgname=vips
pkgver=1.0.13
pkgrel=0
pkgdesc="PHP extension for interfacing with vips - PECL"
url="https://pecl.php.net/package/vips"
arch="all !ppc64le" # Limited by vips aport
license="MIT"
depends="php7-common"
makedepends="php7-dev autoconf vips-dev"
source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgname-$pkgver.tgz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	phpize7
	./configure --prefix=/usr --with-php-config=php-config7
	make
}

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 SKIP_ONLINE_TESTS=1 test
}

package() {
	make INSTALL_ROOT="$pkgdir" install

	install -d "$pkgdir"/etc/php7/conf.d
	echo "extension=$_pkgname.so" > "$pkgdir"/etc/php7/conf.d/$_pkgname.ini
}

sha512sums="
005660e3adb834e38a57b559411f4d33ec3efc5b2bc2e9afe182826618a7670530635ca684e73af2eb2c30ac4d3360653ba53fcfbcb835c712341bd6ed98bea3  php7-pecl-vips-1.0.13.tgz
"
